package com.example.demo.entity.request.repository;

import com.example.demo.common.entity.request.BaseRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 采购单入库查询对象
 *
 * @author Mei Ruoxiao
 * @date 2020-09-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("采购单入库查询对象")
public class PurchaseRepositoryQuery extends BaseRequest {

    @ApiModelProperty(value = "品牌", example = "鸿达安视")
    private String brand;

    @ApiModelProperty(value = "状态(是否完成入库): 0-未完成入库 1-完成入库", example = "1")
    private Boolean state;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期开始", example = "2020-1-25")
    private Date start;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期结束", example = "2020-4-25")
    private Date end;

    @ApiModelProperty(value = "页面", example = "1")
    @Value("${page:1}")
    private int page;

    @ApiModelProperty(value = "页面大小", example = "10")
    @Value("${size:10}")
    private int size;

}
